package com.zzw.bridge.business.service;

import com.zzw.bridge.business.dto.FileDownloadDTO;
import org.springframework.http.ResponseEntity;

import org.springframework.core.io.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.UnsupportedEncodingException;

/**
 * 类描述
 *
 * @author XiaoJie
 * @date 2025/5/22 14:08
 */
public interface FileService {
    /**
     * 文件瞎子啊
     *
     * @param dto {@link FileDownloadDTO}"下载条件"
     * @param response "响应"
     */
   void downloadFile(FileDownloadDTO dto, HttpServletResponse response);

    /**
     * 文件下载
     *
     * @param url "文件地址"
     * @return {@link ResponseEntity<Resource>}
     */
    ResponseEntity<Resource> downloadFileResponseEntity(FileDownloadDTO dto) throws UnsupportedEncodingException;
}
